package com.heima.dfs.api;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "leadnews-dfs",path = "/dfs")
public interface UploadFeign {

    /**
     * 文件下载方法
     * List<String>urls图片地址 http：//192.168.211.136/group1/M00/00/01/XXX.jpg
     * return List<byte[]>
     * @return
     */

    @PostMapping(value = "/list/download")
     List<byte[]> download(@RequestParam List<String> images)throws Exception;



    /**
     * 静态页文件上传，远程调用FastDFS
     * @param content
     * @return
     * @throws Exception
     */
    @PostMapping(value="/html/upload")
    ResponseResult uploadHtml(@RequestParam String content)throws Exception;
}
